export const  baseURL = "http://192.168.16.110:8084"

export const request = (options) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: baseURL + options.url,
			method: options.method || 'GET',
			data: options.data || {},
			header: options.header || {
				'Content-Type': 'application/json'
			},
			success: (res) => {

				if (res.statusCode === 200) {
					resolve(res.data);
				} else {

					reject(res.errMsg);
				}
			},
			fail: (err) => {

				reject(err);
			},
		});
	});
}